/**   
 * Copyright © 2020 eSunny Info. Tech Ltd. All rights reserved.
 * 
 * 功能描述：
 * @Package: cn.xuan.common 
 * @author: 86187   
 * @date: 2020年6月2日 下午4:00:28 
 */
package cn.xuan.common;

import java.util.HashMap;
import java.util.Map;

/**
 * Copyright: Copyright (c) 2020 LanRu-Caifu
 * 
 * @ClassName: Msg.java
 * @Description: 信息反馈
 *
 * @version: v1.0.0
 * @author: 86187
 * @date: 2020年6月2日 下午4:00:28
 *
 *        Modification History: Date Author Version Description
 *        ---------------------------------------------------------* 2020年6月2日
 *        86187 v1.0.0 修改原因
 */
public class Msg {
	private static final String MSG_INFO_LABLE = "info";
	private static final String MSG_RESULT_LABLE = "result";
	private static final String MSG_OBJ_LABLE = "msgObject";

	public static final String MSG_FLAG_SUCESS = "0";
	public static final String MSG_FLAG_ERROR = "1";

	private String result;
	private String info;
	private Object msgObj;
	
	private Map<String, Object> map = new HashMap<String, Object>();

	public Msg() {

	}

	public Msg(String result, String info, Object msgObj) {
		this.result = result;
		this.info = info;
		this.msgObj = msgObj;
	}

	public Map<String, Object> msgToMap() {
		map.put(MSG_RESULT_LABLE, result);
		map.put(MSG_INFO_LABLE, info);
		map.put(MSG_OBJ_LABLE, msgObj);
		return map;
	};

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public Object getMsgObj() {
		return msgObj;
	}

	public void setMsgObj(Object msgObj) {
		this.msgObj = msgObj;
	}

}
